<template>
  <div>
    <el-descriptions title="" :column="3" border>
      <el-descriptions-item label="用户名"  label-class-name="my-label" content-class-name="my-content">{{user.userName}}</el-descriptions-item><br>
      <el-descriptions-item label="手机号" >18100000000</el-descriptions-item><br>
      <el-descriptions-item label="性别">男</el-descriptions-item><br>
      <el-descriptions-item label="血型">AB</el-descriptions-item><br>
      <el-descriptions-item label="生日">1995-2-8</el-descriptions-item><br>
      <el-descriptions-item label="居住地">苏州市</el-descriptions-item><br>
      <el-descriptions-item label="职业">打工人</el-descriptions-item><br>
      <el-descriptions-item label="邮箱" >{{user.userEmail}}</el-descriptions-item>
      <el-descriptions-item label="个人标签">
        <el-tag size="small">傲娇</el-tag>
        <el-tag size="small">美食家</el-tag>
        <el-tag size="small">旅游</el-tag>
      </el-descriptions-item><br>
    </el-descriptions>
  </div>
</template>

<script>

export default {
  name: "spaceinfo",

  mounted(){
    this.getUser();
  },
  data(){
    return{
      user: {
        userName:'admin',
        userEmail:'331747010@qq.com'
      }

    }
  },

  methods:{
    getUser(){
      this.$axios.post("/api/user/show").then(res=>{
        this.user=res.data.data;
        console.log(user)
      })
    },
  }

}
</script>

<style scoped>
.my-label {
  background: #E1F3D8;
}

.my-content {
  background: #FDE2E2;
}

</style>



